Export
VTK tool
Description
Exports regions of the Apex model to VTK format files for
subsequent display in
Paraview
or processing by other
VTK aware tools.
Although this tool exports portions of the model to VTK format
files, the implementation is easily re-used to extract model regions into
in-memory VTK data structures in the Apex scripting environment where they can
be further processed by user developed code.
The Apex model is usually exported as a
vtkPartitionedDataSetCollection
which includes the assembly hierarchy the Apex model. For this case, a single
top level file with a ‘.
vtpc
’ is exported together
with a folder containing the individual
vtkPolyData
/
vtkUnstructuredGrid
files. If ingle Mesh or Geometry bodies
are exported, the exported files will be
inidividual
vtkPolyData
ot
vtkUnstructuredGrid
files with ‘.
vtp
’
or ‘.
vtu
’ file extensions
When the
model s
experted
as a
vtkPartitionedDataSetCollection
, each assembly
node in the tree includes some Apex metadata including the unit system, type,
subtype, pathname and color of each node in the assembly.
The
vtkPolyData
and
vtkUnstructuredGrid
that are used to represent the
individual Mesh and Geometry bodies include
PointData
,
CellData
that are used to store the Node and Element
IDs and the Geometry Face/Edge/Vertex Ids. These objects also include
FieldData
containing the unit system, color and other Apex
data related to the body.
If you experience any issues with this tool, or if you have
suggestions for enhancements, please email me at
doug@cadence.com
or contact
the
support team at MSC.
Tool Usage
1.
Invoke
the tool from the Loads/BC’s group of the Apex Utilities Attribution tool
palette
2.
Select
the portion(s) of the Apex model that you wish to export using the standard
Apex selection methods. Currently the tool supports selection of any
combination of Assemblies (include the full Model), Parts, Geometry bodies and
Mesh bodies)
3.
Choose
the entity types you want to include/exclude. Currently this filter enables
inclusion/exclusion of Geometry bodies or Mesh bodies. By default types both
will be exported from the selected entities
4.
Choose
the type of VTK data structures you want the geometry and mesh bodies to be
converted to.
·
Geometry bodies are always represented by their Faces, Edges and
Vertices and by default the are exported as
vtkPolyData
,
however you can optionally choose to export them as
vtkUnstructuredGrid
if your downstream use cases require
·
Solid meshes are ALWAYS exported as
vtkUnstructuredGrids
,
however 2D, 1D and 0D meshes can be exported as either
vtkPolyData
(Default) or as
vtkUnstructuredGrid
5.
Specify
the name for the exported VTK file. The tool will automatically assign the
correct filename extension for the exported file so you can omit the extension
here. If you prove an extension, the tool will may replace it with the correct
extension base don the exported file type.
- Log in to post comments